import 'dart:core';

class GEntity {
  String topic;
  String label;
  String detail;
  String addition;

  GEntity({this.topic, this.label, this.detail, this.addition});

  GEntity.fromMap(Map<String, dynamic> json)
      : topic = json['topic'],
        label = json['label'],
        detail = json['detail'],
        addition = json['addition'];

  Map<String, dynamic> toMap() =>
      {'topic': topic, 'label': label, 'detail': detail, 'addition': addition};

  static List<GEntity> genFromList(List data) {
    return List.from(data).map((e) => GEntity.fromMap(e)).toList();
  }

  String get body => '$topic , $label , $detail , $addition';
}
